/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */

#include "Root.h"
#include <safe_new.h>
#include <lib3d/hard/Hardware.h>

namespace liba {
namespace lib3d {
namespace node {	

///	extern int matrix_mults;
	
Root::~Root()
{
	/** Children will unregister themselves from root data structures.
		It's too late to delete them from Node::~Node(). We must delete them here. */
	Clear();
	SetGlobalMatrix(Matrix::identity());
}

void Root::RenderToList( hard::Hardware * hardware, hard::RenderList * render_list )
{
	Node::RenderToList( hardware, render_list );
}

void Root::CreateProxy(ProxyVisitor * proxyVisitor)
{
	proxyVisitor->CreateRootProxy(this);
}

} // namespace node
} // namespace lib3d
} // namespace liba